home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 380 < prev    next >
Text File  |  1996-08-06  |  3KB  |  53 lines

  1. Newsgroups: comp.std.c
  2. Path: nntp.coast.net!torn!sq!msb
  3. From: msb@sq.com (Mark Brader)
  4. Subject: Re: fast block zeroing, how defined?
  5. Message-ID: <1996Feb16.082224.16087@sq.com>
  6. Organization: SoftQuad Inc., Toronto, Canada
  7. References: <4fqaj4$2qu@fu-berlin.de> <TANMOY.96Feb13124302@qcd.lanl.gov>
  8. Date: Fri, 16 Feb 1996 08:22:24 GMT
  9.  
  10. To the question:
  11.  
  12. > > Are the representation of zeros in intergral types defined
  13. > > as multiple "char" zeros? (This is true in all the implementations
  14. > > I know of, but it should be also defined in the standard that way)
  15.  
  16. Tanmoy Bhattacharya (tanmoy@qcd.lanl.gov) answers:
  17. > All the significant bits of zero of an integral type, except for the
  18. > highest, must be zero. Unfortunately, it has been decided that not all
  19. > bits are significant. I conclude that some of them can be used for
  20. > parity checks, and I conclude the top bit being zero (with others
  21. > being zero) can result in an invalid value. I am not familiar enough
  22. > with the standard to guarantee my conclusions have any merit: but I
  23. > would like to know why they are wrong if they are.
  24.  
  25. "It has been decided" refers to the official response to Defect
  26. Report 67, contained in Record of Response 2 and Technical Corri-
  27. gendum 2.  As far as I know, RR2/TC2 has still not been published,
  28. and I have no idea what changes may have been made in response to
  29. comments made through national bodies during balloting.
  30.  
  31. In the draft version that was balloted on, it does state that some
  32. integral types can have unused bits; the term defined to refer to these
  33. bits is, unfortunately, "holes".  The draft states that they "do not
  34. participate in forming the value of an object"; that is, they must
  35. simply be ignored, rather than being possibly used for parity.
  36. An exception is made for unsigned char, which cannot have holes;
  37. as some of the material in the draft regarding character types is
  38. obviously wrong, I won't comment on whether this extends to other
  39. character types.
  40.  
  41. The draft gives all this material as part of the RR rather than the
  42. TC, as if it was justified by existing wording in the standard.
  43. In my opinion, this is obviously wrong and a TC is required.  As I
  44. understand there are some machines where holes are required in a
  45. practical implementation, I hope the final TC2 includes changes to
  46. allow for them.
  47. -- 
  48. Mark Brader                  "Could you please continue the petty bickering?
  49. msb@sq.com                    I find it most intriguing."
  50. SoftQuad Inc., Toronto               -- Data ("Haven", ST:TNG, Tracy Torme)
  51.  
  52. My text in this article is in the public domain.
  53.